package com.it.emall.service.impl;


import com.it.emall.domain.Ingredients;
import com.it.emall.domain.Recipes;
import com.it.emall.mapper.IngredientsMapper;
import com.it.emall.mapper.RecipeMapper;
import com.it.emall.service.IngredientsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class IngredientsServiceImpl implements IngredientsService {


    @Autowired
    private IngredientsMapper ingredientsMapper;

    @Override
    public List<Ingredients> selectLevel1List() {
        return ingredientsMapper.selectIngredientsList();
    }

    @Override
    public List<Ingredients> selectChildrenListByPid(Integer pid) {
        return ingredientsMapper.selectChildrenIngredientsByPid(pid);
    }

    @Override
    public Ingredients selectIngredientsById(Integer id) {

        return ingredientsMapper.selectIngredientsById(id);

    }
}
